﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using LayeredArchitectureSample.DataTransferObjects;
using LayeredArchitectureSample.DomainModel;

namespace LayeredArchitectureSample.ServiceContracts
{
    // TODO: autogenerate
    [ServiceContract(Name = "RemoteLocationRepository", Namespace = "TODO")]
    public interface IRemoteLocationRepository
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <exception cref="CannotRemoveEntityException"></exception>
        /// <exception cref="ArgumentException"></exception>
        /// <exception cref="EntityNotFoundException"></exception>
        [FaultContract(typeof(CannotRemoveEntityException))]
        [FaultContract(typeof(ArgumentException))]
        [FaultContract(typeof(EntityNotFoundException))]
        [OperationContract(Name = "RemoveLocation")]
        void RemoveLocation(long id);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        /// <exception cref="CannotAddEntityException"></exception>
        /// <exception cref="ArgumentException"></exception>
        [FaultContract(typeof(CannotAddEntityException))]
        [FaultContract(typeof(ArgumentException))]
        [OperationContract(Name = "AddNewLocation")]
        LocationDto AddNewLocation(string name);

        /// <exception cref="EntityRetrievalException"></exception>
        [OperationContract(Name = "GetAllLocations")]
        [FaultContract(typeof(EntityRetrievalException))]
        IEnumerable<LocationDto> GetAll();
    }
}